Update Payment Recall Status
The Update Payment Recall Status API enables to send request for recalling an outbound payment.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
id Mandatory | String Unique ID of request Example – "1" |
method Mandatory | String Method Name Example – "VisaService.UpdatePaymentRecallStatus " |
params | Object |
api | Object |
credential Mandatory | String API credential provided by NetXD Example – "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=" |
signature Mandatory | String Signature of the digitally signed payload Example – "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==" |
payload | Object |
transaction | Object |
id Mandatory | String Unique ID of transaction Example – "65e1e25d97716c0821868879" |
paymentUpdatedAction Mandatory | String Reason code provided by VISA for recalling a transaction Example – "AC03" |
recallComments Mandatory | String Comment given for recalling the payment Example – "Incorrect account number" |
- cURL
- C#
- Go
- NodeJs
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"id":"1","method":"VisaService.UpdatePaymentRecallStatus","params":{"api":{"credential":"Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5","signature":"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="},"payload":{"transaction":{"id":"65e1e25d97716c0821868879","paymentUpdatedAction":"AC03","recallComments":"Incorrect account number"}}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""method"": ""VisaService.UpdatePaymentRecallStatus"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""credential"": ""Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5"",
" + "\n" +
@" ""signature"": ""MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""transaction"": {
" + "\n" +
@" ""id"": ""65e1e25d97716c0821868879"",
" + "\n" +
@" ""paymentUpdatedAction"": ""AC03"",
" + "\n" +
@" ""recallComments"": ""Incorrect account number""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"id": "1",`+"
"+`
"method": "VisaService.UpdatePaymentRecallStatus",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",`+"
"+`
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"transaction": {`+"
"+`
"id": "65e1e25d97716c0821868879",`+"
"+`
"paymentUpdatedAction": "AC03",`+"
"+`
"recallComments": "Incorrect account number"`+"
"+`
}`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"id": "1",
"method": "VisaService.UpdatePaymentRecallStatus",
"params": {
"api": {
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"transaction": {
"id": "65e1e25d97716c0821868879",
"paymentUpdatedAction": "AC03",
"recallComments": "Incorrect account number"
}
}
}
});
req.write(postData);
req.end();
Body
{
"id": "1",
"method": "VisaService.UpdatePaymentRecallStatus",
"params": {
"api": {
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"transaction": {
"id": "65e1e25d97716c0821868879",
"paymentUpdatedAction": "AC03",
"recallComments": "Incorrect account number"
}
}
}
}
Response: 201
Response Parameters
Parameter | Description |
---|---|
jsonrpc | String JSON RPC VERSION – should be "2.0" |
result | Object |
responseList | Array |
reasonCode | String Reason Code provided by VISA for payment recall Example – "Z202" |
reasonDesc | String Description of reason given for the payment recall Example – "Payment Recall request successful" |
id | String Unique ID of the request Example – "1" |
{
"jsonrpc": "2.0",
"result": {
"responseList": [
{
"reasonCode": "Z202",
"reasonDesc": " Payment Recall request successful."
}
]
},
"id": "1"
}